@import 'mertonic/mertonic.scss';
@import 'material-design-icons/iconfont/material-icons.css';
@import '~@angular/material/prebuilt-themes/indigo-pink.css';

@import '~xterm/dist/xterm.css';

@import "~ng-zorro-antd/style/index.min.css"; /* 引入基本样式 */
@import "~ng-zorro-antd/date-picker/style/index.min.css"; /* 引入组件样式 */

html {
  // min-width: 1366px;
  font-size: 14px;
}

body {
  font-family: '-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif';
  scroll-behavior: smooth;
  font-size: 14px;
}

.cdk-overlay-container {
  z-index: 9999;
}
table.center {
  th,
  td {
    text-align: center;
  }
}
.modal {
  .modal-content {
    .modal-header,
    .modal-footer,
    .modal-body {
      padding: 15px;
    }
  }
}
.g-pointer {
  cursor: pointer;
}
// 表格排序头
.g-data-sorting {
  user-select: none;
  &::after {
    display: inline-block;
    content: ' \2191';
    opacity: 0.5;
  }
  & > :last-child {
    &::after {
      opacity: 0.5;
      padding-left: 0.5rem;
      margin-right: -5px;
      display: inline-block;
      content: '\2193';
    }
  }
  &.data_asc {
    & > :last-child {
      &::after {
        opacity: 1;
      }
    }
  }
  &.data_desc {
    &::after {
      opacity: 1;
    }
  }
}
// 卡片标题
.g-card-title {
  font-size: 1.5rem;
  margin-right: 3rem;
  white-space: nowrap;
}
// 顶部提交按钮
.g-top-button-group {
  position: absolute;
  top: 100px;
  right: 30px;
}
// 表格选择框宽度
.g-table-checkbox {
  width: 2rem;
}
// 选择框中文居中
select.form-control {
  padding-top: 0.5rem;
  font-family: 'Noto Sans';
}

// 图片预览框验证
.was-validation {
  &.submitted {
    .form-control.ng-invalid {
      &[type='file'] + div {
        border-color: red;
      }
    }
  }
  .form-control.ng-invalid.ng-dirty {
    &[type='file'] + div {
      border-color: red;
    }
  }
}

.g-my-form {
  .form-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    label {
      margin-right: 1rem;
      margin-bottom: 0;
      min-width: 5rem;
      order: -1;
    }
    .form-control {
      flex: 1;
    }
  }
  .invalid-feedback {
    margin-left: 6rem;
  }
}

.form-group.required {
  label {
    position: relative;
    &::before {
      content: '*';
      color: red;
      position: absolute;
      top: 0;
      left: 0;
      transform: translateX(-100%);
    }
  }
}

.g-flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
.g-nowrap {
  white-space: nowrap;
}
.g-full-height {
  min-height: calc(100vh - 260px);
}
.form-control {
  border-color: #dfe1e5;
}
.g-sticky {
  position: sticky;
  top: 80px;
}
.g-photo-size {
  // 两寸
  width: 3.4cm;
  height: 5.2cm;
}

button.g-delible {
  position: relative;
  &:hover::after {
    content: '-';
    font-size: 1.5rem;
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    position: absolute;
    background-color: darkgray;
    color: white;
    border-radius: 50%;
    top: 0;
    right: 0;
    transform: translateX(30%) translateY(-30%);
    line-height: 1rem;
  }
}

// fix ngb input
.ngb-tp-input {
  width: 100% !important;
}

.g-icon-size {
  max-width: 24px;
  max-height: 24px;
}
